UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sx5rn1JOIzr6SVsGv37hJQaMgWtFLyE+XpaDt0OOnQs='
WHERE
key_id = '4621f0c9a9a30b01d0ff6f21e3381a8219b51f0a98d6d6851fd770f0c1e8f97b'
AND (
token = 'sx5rn1JOIzr6SVsGv37hJQaMgWtFLyE+XpaDt0OOnQs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)