UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RzPZrBlWg0jCC6TOoV4pdHjk8XVswhmvXCTM06JiwN0=' 
WHERE 
  key_id = 'ea633fdc4db659da0353547a8dc21b6c8c652b0399f431612f4ca26ba0c5061b' 
  AND (
    token = 'RzPZrBlWg0jCC6TOoV4pdHjk8XVswhmvXCTM06JiwN0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029