UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9rtF3oU+SyKsV1Lez9DqUbYGDLLOR//3jpq4wi6BbsA='
WHERE
key_id = '0bc6544843dd31a3a8f841b0f531334701aa66f56b9e7596925054160d36c46a'
AND (
token = '9rtF3oU+SyKsV1Lez9DqUbYGDLLOR//3jpq4wi6BbsA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)