UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jbSHfibp8U7LzN498ciG0dmIrG9t/7FcPJ/keQ+xj4g=' 
WHERE 
  key_id = '8226e38d792a5fde29aeef91394aeb4ea6149bf1b6311c8a8edb5cfd0fcc2f07' 
  AND (
    token = 'jbSHfibp8U7LzN498ciG0dmIrG9t/7FcPJ/keQ+xj4g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029