UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M9lR0PQFoeVfzf/dKMw+ADJ9LDaJlPLOxmd0JXiJrEA='
WHERE
key_id = '56200317a87d5981473939e7e2dc0b626b739304dcc549d4cea65723f65144fd'
AND (
token = 'M9lR0PQFoeVfzf/dKMw+ADJ9LDaJlPLOxmd0JXiJrEA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)