UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RvLt/t27PGX8ABDQ2fpm9hYS/z2i0Ii/5aqGvNjirao=' 
WHERE 
  key_id = 'b710181f9eed3c70e13389729e7390d336b16fa07108511d3d3b74d2a66cefa2' 
  AND (
    token = 'RvLt/t27PGX8ABDQ2fpm9hYS/z2i0Ii/5aqGvNjirao=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035