UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UrwcEXs2+O4xAQlZskOo73RARJme0ehoB6g2qZV6nxY=' 
WHERE 
  key_id = '9eb1effcaa609d21afe2c438b6318691de482d56b8adc4e5a161f89d3a49fbdb' 
  AND (
    token = 'UrwcEXs2+O4xAQlZskOo73RARJme0ehoB6g2qZV6nxY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028