UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RoxpY4EVulNUnH0rkh+tlFYFtkGs2W/lRDdqhswgoWI='
WHERE
key_id = '48ab8ac846f32b59fc8d3f0f10aa43125d6adff1da2ce71bc782d17a1c264d5a'
AND (
token = 'RoxpY4EVulNUnH0rkh+tlFYFtkGs2W/lRDdqhswgoWI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)