UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SycRcxG6vtSVUvMLg2NrQ4XkOZdKtZS9Xsp7BOWAwO0=' 
WHERE 
  key_id = '0282023edb22ca3ed71fd256509d4245d261bc7cfe05907fd3ad9d4fe75170c0' 
  AND (
    token = 'SycRcxG6vtSVUvMLg2NrQ4XkOZdKtZS9Xsp7BOWAwO0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024