UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SoOHEBEfU/XtOFAshBj5IXrdjWYL05SN1LeTCT1EMFk='
WHERE
key_id = 'c44a5ce140b7cb1d5cc083c0f75b82e01a03c549e7d05abdf849a4e468657c00'
AND (
token = 'SoOHEBEfU/XtOFAshBj5IXrdjWYL05SN1LeTCT1EMFk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)