UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qyxqiv/bi9M0RiV6m7aKnwqODT8gbaFTAg6d/f2KFls=' 
WHERE 
  key_id = '6f5e13f2717b4c770c5469f979ed848e928b0b5ff7cda72ceb5216dc2df9c2de' 
  AND (
    token = 'qyxqiv/bi9M0RiV6m7aKnwqODT8gbaFTAg6d/f2KFls=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020