UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qMefDzNDb+jS+0k1K7UTP2/bfzlfniBxu7AtLd95x/M='
WHERE
key_id = '8a0f18f0f9243ac171697c7fb8e704e228f6d4f38856ddf4042ea93320387425'
AND (
token = 'qMefDzNDb+jS+0k1K7UTP2/bfzlfniBxu7AtLd95x/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)