UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ARILu9OINDTI056TUn+t6T9zLdCT8FSWt0hEJvb+/QQ='
WHERE
key_id = '0d7232dcb4c246ae222e1b1f3ec2e9b6cb4bcf8ef9e217fb28b377a3237fcf23'
AND (
token = 'ARILu9OINDTI056TUn+t6T9zLdCT8FSWt0hEJvb+/QQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)