UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2z4gTQtkspnR0luFiLwaIROetzXVLxbMK6Id2XJWav4='
WHERE
key_id = '69ff697bf61aca8700e571dd7771cd9f950c7f74fff3c4b929d2550c1aba5e42'
AND (
token = '2z4gTQtkspnR0luFiLwaIROetzXVLxbMK6Id2XJWav4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)