UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VR53XuhwnyqveRMejyaZb8OE7d+Gl3AYDoQUim5Ybs='
WHERE
key_id = '814dde1bea774629c1dfb7cb83eb4ed7b60e66797632247f5a616f2e4694f896'
AND (
token = '+VR53XuhwnyqveRMejyaZb8OE7d+Gl3AYDoQUim5Ybs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)