UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1GVP4kVRnRgpyt1bkIrYdVm/LCznOrvWIe/ozYrHIJQ='
WHERE
key_id = '1bea377e820862b2f8cf37ab99bd2f2711a9937d59bffce68be4ab041ba468d3'
AND (
token = '1GVP4kVRnRgpyt1bkIrYdVm/LCznOrvWIe/ozYrHIJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)