UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4zLbrXXjLFQii2BfS++Yb0xGixbthV8WoBGkRqYkZJc='
WHERE
key_id = '1d5189dd3f0850039927ae2803d0a84726ff3edb739040f01732d3cb8ad5c94a'
AND (
token = '4zLbrXXjLFQii2BfS++Yb0xGixbthV8WoBGkRqYkZJc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)