UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+nk/mw1Lo3UPtAGoBhaWPvXKeW64qtJTdc+jD7tocd8='
WHERE
key_id = 'f6002047343f780be677ddec13dfbcad360268a4907a769aefe32fdf520c7e03'
AND (
token = '+nk/mw1Lo3UPtAGoBhaWPvXKeW64qtJTdc+jD7tocd8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)