UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kWkYny0ulFUSK5/ytA53i/ywc7Wyzckbwn/Rn4qtIu8='
WHERE
key_id = '367895e85054e50cdd8761d43de52982d2df8d195f1618d453850812bb9d11a9'
AND (
token = 'kWkYny0ulFUSK5/ytA53i/ywc7Wyzckbwn/Rn4qtIu8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)