UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l8xftFpbnJSmlynOuSRZ2+KKW6/9IRmi0KOleNxq4Tk='
WHERE
key_id = '011c2190ff0341d901f6d5e8edbdaad96f55923cde6103a74d21440df8252e11'
AND (
token = 'l8xftFpbnJSmlynOuSRZ2+KKW6/9IRmi0KOleNxq4Tk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)