UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PcS+JrURRXuem0eKN4cgF9fIRuRMn6TDgZC/U3pk2CQ='
WHERE
key_id = 'feb1ab134889766f92b929dee1a633d6c226666b745817bf90f78d5fcaf1849c'
AND (
token = 'PcS+JrURRXuem0eKN4cgF9fIRuRMn6TDgZC/U3pk2CQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)