UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DbZxLuCVs+6jAngfmdlL3kflt4c3QzR5obNxsJN5ChU='
WHERE
key_id = '453cd4eeacc943d6041c228231d8fa0ba4e92d9aaa21ae66a4dddf954ede1878'
AND (
token = 'DbZxLuCVs+6jAngfmdlL3kflt4c3QzR5obNxsJN5ChU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)