UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eEoHQJTqZWbR7bhlDLNO2VtfcCmKru17u7+8OmhCdj0=' 
WHERE 
  key_id = '3e8463bb95d93035b0c0fd62ae74b780f6a547a9b3c8fbaef7e8b813df237fe3' 
  AND (
    token = 'eEoHQJTqZWbR7bhlDLNO2VtfcCmKru17u7+8OmhCdj0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032