UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F4BFpHwtl2ppIkxlHjU/CtQ488IiQsHZz++v5Xf65qU='
WHERE
key_id = '872cfdf47c1465ac98c47181fdc7c6958058e5c66be7a1ae6670c3484028b183'
AND (
token = 'F4BFpHwtl2ppIkxlHjU/CtQ488IiQsHZz++v5Xf65qU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)