UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aZzNzU0g7uW045FImRxAWQ0COqrPSMM8SKFut/YNcwQ='
WHERE
key_id = '33864aeb6ebd8528977be49f09507ba6d21aff5998287d2f4b3e3ae4a7683859'
AND (
token = 'aZzNzU0g7uW045FImRxAWQ0COqrPSMM8SKFut/YNcwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)