UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DkzCFTQ7Mvth2U0qdmu+ZCZbF3czYkfypqu8U8UckKg='
WHERE
key_id = 'ee076cd316d62bfbde94685c232e5b5d9f410b91a50bc3dae9f9ae2ac2fa6f02'
AND (
token = 'DkzCFTQ7Mvth2U0qdmu+ZCZbF3czYkfypqu8U8UckKg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)