UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uWhEoD/DMLCvanAOuTbQj8l8jFWrvKvHK9iJ5ZGN7sc=' 
WHERE 
  key_id = '83dc0b225725f734f5cba017cd8d8ae54247a6fa8b7dddf8f35d86eb05f801e6' 
  AND (
    token = 'uWhEoD/DMLCvanAOuTbQj8l8jFWrvKvHK9iJ5ZGN7sc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027