UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ukoKmqC2Xm2dvfTvTwfl5iAS4d3HdCf9yWSoSWqPkwc='
WHERE
key_id = '70ba741cef5fc45daa0232a44e64a9d55845535957ea938ad3a96a001c2b88a9'
AND (
token = 'ukoKmqC2Xm2dvfTvTwfl5iAS4d3HdCf9yWSoSWqPkwc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)