UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9I4t7x2Q5yYa89R4z/sY2DTOXK41x275gkyjKO1RLys='
WHERE
key_id = '260a9f01948e05aa423e0b225bc7d4e4e1a26d0dcc3537a1aa8c6064b4c9c0fd'
AND (
token = '9I4t7x2Q5yYa89R4z/sY2DTOXK41x275gkyjKO1RLys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)