UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rodxejzx4eD7/cTjpFa62jv0ZPOtOoNsDj0Ieveae2Q='
WHERE
key_id = '35a7a5398246441fac1e848b56684534d182fb7d5e4c66ac7b8d0920f49e3341'
AND (
token = 'rodxejzx4eD7/cTjpFa62jv0ZPOtOoNsDj0Ieveae2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)