UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zaqtRMeJ/bTTSfQxcZbYNUPoaNGew3g8Q20fiHL8IRU='
WHERE
key_id = '65052b6ec269de59f23e88c6b39d0c80c0c07fac642a7d80be3116a6c40cb955'
AND (
token = 'zaqtRMeJ/bTTSfQxcZbYNUPoaNGew3g8Q20fiHL8IRU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)