UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8dilq3hYldOmVmmTFuj0gyLaM6RntqmaZHI/UmR/c9A='
WHERE
key_id = '41aad81040e0dbf49eb8b2bfdf0eae354fe81a6a45ff85957c24fa2a49ae9111'
AND (
token = '8dilq3hYldOmVmmTFuj0gyLaM6RntqmaZHI/UmR/c9A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)