UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eieiEMJ+o6UICp5srArsIlYKxSEdx1vkg6+1aY4y+nQ='
WHERE
key_id = '08caa41722aae31d33b8d6f285fc9e22d700292667d988a002cd1b223f8a060c'
AND (
token = 'eieiEMJ+o6UICp5srArsIlYKxSEdx1vkg6+1aY4y+nQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)