UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8nMP1w2w+u1Tw6Vuya5CPhaSoqKNY8qxr6CnvrrM6Kk='
WHERE
key_id = '011b9023a0b976aeb4404066a6871f81d66e6c47f8b57ce68f9908279e15041d'
AND (
token = '8nMP1w2w+u1Tw6Vuya5CPhaSoqKNY8qxr6CnvrrM6Kk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)