UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nK6UoXgQs/BYa4orcq0IIVsRncIjcM2B7gsyUOlXptY=' 
WHERE 
  key_id = 'eac728cabb61b29e22cb2afbf2da82266cb2bfd4e053a4d18b55cd47512d7d6f' 
  AND (
    token = 'nK6UoXgQs/BYa4orcq0IIVsRncIjcM2B7gsyUOlXptY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029