UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eeU5evFIulT8j41j9arFPp+trmaHzTl0BAY7aLPVxl0='
WHERE
key_id = 'f32957300b67f7379431c4abedba93d102dc56198b79da6cc400bdd1e32d0b4a'
AND (
token = 'eeU5evFIulT8j41j9arFPp+trmaHzTl0BAY7aLPVxl0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)