UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 300,
token = 'HYYCqigdysp2gcbWs1EelyRbo9Q69zFJ4ejt85W7oyM='
WHERE
key_id = '22519985544e2359152dea1834addde1b7d866b747db5c7b8523fb5a243fd96c'
AND (
token = 'HYYCqigdysp2gcbWs1EelyRbo9Q69zFJ4ejt85W7oyM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)