UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4Z2Aq5+VQmubWH4+sEvYQCEPgkb+9w/TwNpQVZ32rv0=' 
WHERE 
  key_id = '8570bfeb095bec26ebeff265715159527582357e1f7daf3872451341af1cc003' 
  AND (
    token = '4Z2Aq5+VQmubWH4+sEvYQCEPgkb+9w/TwNpQVZ32rv0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040