UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F104Dz5Npp2ISux5LCYAZwLy8TFVMbVsH8VuN5S3zLo='
WHERE
key_id = 'd7b4ed87dc29ae5e39c92cb26cad209ef83295cddeaf21ee448672ebe9d393f3'
AND (
token = 'F104Dz5Npp2ISux5LCYAZwLy8TFVMbVsH8VuN5S3zLo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)