UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mUusit5D9awTW+u9hKw3ZY5GPVfyByjCUwtIQQ+iVNg='
WHERE
key_id = '9408508d29a156a7f4c4d9648c640c86b2530dde184c300959dafce0d356ccbd'
AND (
token = 'mUusit5D9awTW+u9hKw3ZY5GPVfyByjCUwtIQQ+iVNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)