UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uajTHYjI8JY/ZsS3Iz3KibOlB4bDGyBxJ23gZ/ine5E=' 
WHERE 
  key_id = 'df41b9206bca8cc7efa6ae15a1db6b57f520e4a796fe2ade0f4faa1d88ccbb28' 
  AND (
    token = 'uajTHYjI8JY/ZsS3Iz3KibOlB4bDGyBxJ23gZ/ine5E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018