UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vm53t1HjtiiZ/ZKc84YRVB2ocm7EAI3+R1m0adlGp7E=' 
WHERE 
  key_id = '04fa1d12febc34467f6741ebd8b4a15be9f51715eb8294092f939c135a9d4873' 
  AND (
    token = 'vm53t1HjtiiZ/ZKc84YRVB2ocm7EAI3+R1m0adlGp7E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015