UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QDvgqdI84DKYO0zy/4xvn/ZZUBHoDLBLhjzy+DOxKRU='
WHERE
key_id = 'ea6f164733c09a0bf1e6611d7b76f9ab3b98976dbc464ad2dec6e7b671c08f79'
AND (
token = 'QDvgqdI84DKYO0zy/4xvn/ZZUBHoDLBLhjzy+DOxKRU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)